package com.briup.day09;

public class Test_Extends {
    public static void main(String[] args) {
        Son s1 = new Son();
        s1.skidding();
        s1.farming();
        s1.skidding();
//        不支持多继承，支持多层继承
//        爸爸继承爷爷，儿子继承爸爸
    }
}
class Grandpa{
    public void farming(){
        System.out.println("爷爷爱种地");
    }
}
class Father extends Grandpa{
    public void fishing(){
        System.out.println("爸爸爱钓鱼");
    }
}
class Son extends Father{
    public void skidding(){
        System.out.println("孙子爱轮滑");
    }
}
